package com.example.ws.util;

import lombok.Data;

@Data
public class RespEntity {
  private String code;
  private String message;
  private Object data;
  private long timestamp;

  public static final int CODE_SUCCESS = 200;
  public static final int CODE_ERROR = 500;
  public static final int CODE_NOT_FOUND = 404;
  public static final int CODE_BAD_REQUEST = 400;

  public RespEntity(int code, String message, Object data) {
    this.code = String.valueOf(code);
    this.message = message;
    this.data = data;
    this.timestamp = System.currentTimeMillis();
  }
  
}
